package com.nodecollege.cloud.client.feign;

import com.nodecollege.cloud.client.fallback.ApiClientFallback;
import com.nodecollege.cloud.common.model.NCResult;
import com.nodecollege.cloud.common.model.po.UpmsApi;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author LC
 * @date 2020/1/10 9:47
 */
@Primary
@FeignClient(value = "UPMS", path = "/api", fallback = ApiClientFallback.class)
public interface ApiClient {

    /**
     * 添加接口访问数据
     *
     * @param apiVisit
     * @return
     */
    @PostMapping("/initApiList")
    NCResult<UpmsApi> initApiList(@RequestBody List<UpmsApi> apiVisit);
}
